package com.example.pc.mytestapplication.activity;

import android.app.Activity;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.View;

import com.example.pc.mytestapplication.util.YZLog;
import com.trello.rxlifecycle2.components.support.RxAppCompatActivity;

/**
 * Created by lxg on 2018/1/25.
 */

public abstract class BaseActivity extends RxAppCompatActivity implements View.OnClickListener {
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        YZLog.i("当前Activity为:" + BaseActivity.class.getSimpleName());
        loadView();
        setinitView();
        loadData();
    }

    /**
     * 加载界面
     */
    protected abstract void loadView();

    /**
     * 设置界面相关细节
     */
    protected abstract void setinitView();

    /**
     * 加载数据
     */
    protected abstract void loadData();
}
